﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<cludg.Domain.Content.Stories.Story>>" %>
<%@ Import Namespace="cludg.Web.RenderHelpers" %>
<%@ Import Namespace="cludg.Web.Core.RenderHelpers" %>

<div class="storiesTop">
	<h5>Топ 10</h5>
	<table>
	<% foreach (var story in Model)
	{%>
		<tr>
			<td class="position-col">
				<span class="<%: ((int?)story.Rate ?? 0) >= 0 ? "pos" : "neg" %>">
				<%: string.Format("{0}", (int?)story.Rate ?? 0 )%>
				</span>
			</td>
			<td>
				<%: Html.StoryLink(Html.TrimLongText(story.Title, 25).ToString(), story)%>
			</td>
		</tr>
	<% } %>
	</table>
</div>